* Stata .do file for Nizan Feldman and Mark Shiptan  "Gunboats and butter: The two percent guideline and NATO burden shifting in the maritime domain"  https://doi.org/10.1080/13523260.2024.2343637
* CONTEMPORARY SECURITY POLICY *
* Please send any questions or comments to nfeldman@poli.haifa.ac.il

*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
*** Replication Code for Tables  in the  Main Text and Appendix
*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


* In the dataset, naval data is updated only for observations that are included in the analysis (i.e., when the variable 'included_in_analysis' equals 1)."


sort included_in_analysis ccode year

xtset  ccode year 
 
***Table 1: Wales Pledgeand Naval Power***


***Model ***

asdoc xtreg tonnage_to_GDP_2015 Wales_pledge Competition Coastline Non_NATO_land_border Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015 Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power  if ccode~=2 & NATO==1 & year>2008 & year<2020 , cl(ccode), nest replace

***Modle 2***
asdoc  xtreg tonnage_to_GDP_2015 Wales_pledge Competition  Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015 Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power if ccode~=2 & NATO==1 & year>2008 & year<2020 , fe cl(ccode), nest append 


***Modle 3***
asdoc xtreg state_total_tonnage Wales_pledge Competition  Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015 Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power if ccode~=2 & NATO==1 & year>2008 & year<2020 , fe cl(ccode), nest append 


***Modle 4***
asdoc xtreg ln_state_total_tonnage Wales_pledge Competition  Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015 Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power if ccode~=2 & NATO==1 & year>2008 & year<2020 , fe cl(ccode), nest append 


***Table 2. Robustness Tests.***

***Modle 5 ERC***

asdoc xtreg d.tonnage_to_GDP_2015 l.tonnage_to_GDP_2015 l.Wales_pledge l.Competition l.Urban_population l.Trade_Openness l.PEC l.GDP_2015 l.GDP_Per_capita_2015 l.Years_in_NATO l.Threat l.Russians_Naval_Power l.Alliance_Naval_Power  d.Wales_pledge d.Competition d.Urban_population d.Trade_Openness d.PEC d.GDP_2015 d.GDP_Per_capita_2015 d.Years_in_NATO d.Threat d.Russians_Naval_Power d.Alliance_Naval_Power if ccode~=2 & NATO==1 & year>2008 & year<2020 ,fe cl(ccode), nest replace

***Modle 6 Dynamic Pooled Mean Group***
xtpmg d.tonnage_to_GDP_2015 d.Wales_pledge d.Competition d.Urban_population d.Trade_Openness d.PEC d.GDP_2015 d.GDP_Per_capita_2015 d.Years_in_NATO d.Threat d.Russians_Naval_Power d.Alliance_Naval_Power, lr (l.tonnage_to_GDP_2015 l.Wales_pledge l.Competition l.Urban_population l.Trade_Openness l.PEC l.GDP_201 l.GDP_Per_capita_2015 l.Years_in_NATO l.Threat l.Russians_Naval_Power l.Alliance_Naval_Power) ec(ec) replace dfe, if ccode~=2 & NATO==1 & year>2008 & year<2020

***Modle 7 Arellano-Bond***
asdoc  xtabond tonnage_to_GDP_2015 Wales_pledge Competition  Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015 Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power  if ccode~=2 & NATO==1 & year>2008 & year<2020 , lags(2) vce(robust), nest append 



***Table 3. Robustness Tests.***


* Note- This command is applicable only for Stata 17 or later versions. The commaand must exclude states that joined the treatment group after the initiation of the treatment. Therefore, State 341 (Montenegro), which joined NATO in 2017, was not included in this analysis. Including State 341 (Montenegro) by manually generating the interaction for the Difference-in-Differences analysis does not substantively alter the results.


* Modle 8  All states in the system* 

xtdidregress ( state_total_tonnage Competition  Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015) (treated) if  ccode~=2 & ccode~=341 & year>2008 & year<2020, group(ccode) time(year)

estat ptrends

estat granger

* Modle 9 U.S.allies  All states in the system* 


xtdidregress ( state_total_tonnage Competition Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015) (treated) if  ccode~=2 & ccode~=341 & year>2008 & year<2020 &  US_ALLIES ==1, group(ccode) time(year)

estat ptrends

estat granger

* Modle 10 U.S.allies the imposed sanctionsand non-NATO EU members* 
 

xtdidregress ( state_total_tonnage Competition Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015) (treated) if  ccode~=2 & ccode~=341 & year>2008 & year<2020 &  US_EUROP_US_ALLIES_sanctio ==1, group(ccode) time(year)

estat ptrends

estat granger


*** Appendix***

* Table A2. GDP values measured in current dollars*

asdoc xtreg GDP_NAVY Wales_pledge Competition Coastline Non_NATO_land_border Urban_population Trade_Openness PEC GDP GDP_per_capita Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power if ccode~=2 &NATO==1 & year>2008 & year<2020 , cl(ccode), nest replace

asdoc xtreg GDP_NAVY Wales_pledge  Non_NATO_land_border Urban_population Trade_Openness PEC GDP GDP_per_capita Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power if ccode~=2 & NATO==1 & year>2008 & year<2020 ,fe cl(ccode), nest replace


asdoc xtreg state_total_tonnage Wales_pledge Competition Urban_population Trade_Openness PEC GDP GDP_per_capita Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power if ccode~=2 &NATO==1 & year>2008 & year<2020 ,fe cl(ccode), nest replace

asdoc xtreg ln_state_total_tonnage Wales_pledge Competition Urban_population Trade_Openness PEC GDP GDP_per_capita Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power if ccode~=2 &NATO==1 & year>2008 & year<2020 ,fe cl(ccode), nest replace


* Table A3. Alternative specifications for naval power*

asdoc xtreg tonnage_to_personal Wales_pledge Competition Coastline Non_NATO_land_border Urban_population Trade_Openness PEC GDP GDP_per_capita Years_in_NATO Threat Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power if ccode~=2 & NATO==1 & year>2008 & year<2020 , cl(ccode), nest replace

asdoc  xtreg tonnage_to_personal Wales_pledge Competition  Urban_population Trade_Openness PEC GDP GDP_per_capita  Years_in_NATO Threat Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power if ccode~=2 & NATO==1 & year>2008 & year<2020 , fe cl(ccode), nest append 


asdoc xtreg tonnage_to_military_expenditure Wales_pledge Competition Coastline Non_NATO_land_border Urban_population Trade_Openness PEC GDP GDP_per_capita Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power if ccode~=2 & NATO==1 & year>2008 & year<2020 , cl(ccode), nest append

asdoc  xtreg tonnage_to_military_expenditure Wales_pledge Competition  Urban_population Trade_Openness PEC GDP GDP_per_capita  Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power if ccode~=2 & NATO==1 & year>2008 & year<2020 , fe cl(ccode), nest append 


* Table A4. Alternative Controls * 


asdoc xtreg GDP_NAVY Wales_pledge Competition Coastline Non_NATO_land_border nato_Contiguity nato_marine_border Urban_population Trade_Openness PEC GDP GDP_per_capita Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power if ccode~=2 &NATO==1 & year>2008 & year<2020 , cl(ccode), nest replace

asdoc xtreg GDP_NAVY Wales_pledge Competition annualaveragegrowthrate Urban_population Trade_Openness PEC GDP GDP_per_capita Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power if ccode~=2 &NATO==1 & year>2008 & year<2020 , fe cl(ccode), nest replace

asdoc xtreg GDP_NAVY Wales_pledge Competition  Urban_population Trade_Openness PEC  GDP_per_capita ln_pop Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power if ccode~=2 & NATO==1 & year>2008 & year<2020 , fe cl(ccode), nest replace



* Table A5. Including Naval Exports Control* 

asdoc xtreg tonnage_to_GDP_2015 Wales_pledge Competition Coastline Non_NATO_land_border Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015 Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power  naval_export if ccode~=2 & NATO==1 & year>2008 & year<2020 , cl(ccode), nest replace

asdoc  xtreg tonnage_to_GDP_2015 Wales_pledge Competition  Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015 Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power naval_export if ccode~=2 & NATO==1 & year>2008 & year<2020 , fe cl(ccode), nest append 


asdoc xtreg state_total_tonnage Wales_pledge Competition  Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015 Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power naval_export if ccode~=2 & NATO==1 & year>2008 & year<2020 , fe cl(ccode), nest append 


asdoc xtreg ln_state_total_tonnage Wales_pledge Competition  Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015 Years_in_NATO Threat Russians_Naval_Power Alliance_Naval_Power naval_export if ccode~=2 & NATO==1 & year>2008 & year<2020 , fe cl(ccode), nest append 



* Table A6 *

asdoc xtreg calss Wales_pledge Competition Coastline Non_NATO_land_border Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015 Years_in_NATO Threat  SR spline_class if ccode~=2 & NATO==1 & year>2008 & year<2021 , cl(ccode) , nest replace

asdoc xtreg calss Wales_pledge Competition  Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015 Years_in_NATO Threat  SR spline_class if ccode~=2 & NATO==1 & year>2008 & year<2021 , fe  cl(ccode) , nest append

asdoc xtreg ln_tonnage_of_naval Wales_pledge Competition Coastline Non_NATO_land_border Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015 Years_in_NATO Threat  ln_spline_sum_tonnage_of_naval SR if ccode~=2 & NATO==1 & year>2008 & year<2021, cl(ccode), nest append 

asdoc xtreg ln_tonnage_of_naval Wales_pledge Competition Urban_population Trade_Openness PEC GDP_2015 GDP_Per_capita_2015 Years_in_NATO Threat  ln_spline_sum_tonnage_of_naval SR if ccode~=2 & NATO==1 & year>2008 & year<2021, fe cl(ccode), nest append 
